package oj0417.oj0417_03;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] data = new int[100][100];
        int num = 1;
        for (int i = 0; i < n; i++){
            for (int j = 0; j < n; j++){
                data[i][j] = num;
                num++;
            }
        }

        for (int i = 0; i < n; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print(data[i][j]);
                if(i == n-1 && j == n-1){
                    System.out.println();
                }else {
                    System.out.print(" ");
                }
            }
        }

        sc.close();
    }
}
